package com.study.demo_aop.controller;

import com.study.demo_aop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: UserController
 * @Description:
 * @author: WS
 * @date 2020/12/13
 * @Version: 1.0
 **/
@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/getName")
    public String getName(Integer id){
        return userService.getName(id);
    }
    @GetMapping("/delete")
    public void delete(Integer id){
        userService.delete(id);
    }
}
